home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / File.Type.Notes / FTN.A0.0000 < prev    next >
Encoding:
Text File  |  1989-03-22  |  31.6 KB  |  564 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. File Type:         $A0 (160)
  7. Auxiliary Type:    $0000
  8.  
  9. Full Name:     WordPerfect Word Processing File
  10. Short Name:    WordPerfect Document
  11.  
  12. Written by:    Matt Deatherage                                   January 1989
  13.  
  14. Files of this type and auxiliary type contain WordPerfect(TM) documents.
  15. _____________________________________________________________________________
  16.  
  17. WordPerfect(TM) for the Apple IIe and IIc provide more than 110 word 
  18. processing features.  In addition to a 50,000-word spelling checker and a 
  19. thesaurus, the program offers footnotes, headers and footers, mail-merge, 
  20. macros, search and replace, on-line help, file management, and dozens of 
  21. formatting features.
  22.  
  23. WordPerfect for the Apple IIGS includes all these features and more.  The 
  24. program has a mouse interface with pull-down menus and allows for the editing 
  25. multiple documents.  Users can edit an unlimited number of documents at the 
  26. same time and can take advantage of any memory available.
  27.  
  28. For more information on WordPerfect, contact:
  29.  
  30.                     WordPerfect, Inc.
  31.                     1555 North Technology Way
  32.                     Orem, Utah  84057
  33.                     Attention:  Apple II WordPerfect Technical Support
  34.                     Telephone:  (801) 225-5000
  35.  
  36. The WordPerfect file format is copyrighted (C) 1984, 1985, 1986, 1987 and 1988 
  37. by WordPerfect Corporation and is printed here with permission.
  38.  
  39.  
  40. File Structure
  41.  
  42. WordPerfect files are ASCII files.  The text is neither encrypted nor 
  43. compacted.  There is no end-of-file character, and padding past the end of a 
  44. document with garbage may cause WordPerfect to crash.
  45.  
  46. Formatting or function codes are embedded as they occur in the text.  No code 
  47. is used for beginning of file or end of file.  When creating WordPerfect files 
  48. from other programs, keep in mind the following:
  49.  
  50. o    The initial WordPerfect margin settings are usually 10 and 74, 
  51.      and it is best to keep the line length to 65 or less, unless you 
  52.      change the margin settings.
  53. o    It is best not to pad with spaces.
  54.  
  55.  
  56. Function Codes
  57.  
  58. All function codes are listed in hexadecimal.  All except the first five have 
  59. the high bit set.  Function codes above $C0 are discussed under "Multi-Byte 
  60. Functions."
  61.  
  62.   Code   Command
  63.   $09    Tab
  64.   $0A    Hard New Line
  65.   $0B    Soft New Page
  66.   $0C    Hard New Page
  67.   $0D    Soft New Line
  68.  
  69.   $80    No operation
  70.   $81    Turn right justification on
  71.   $82    Turn right justification off
  72.   $83    End of centered text
  73.   $84    End of aligned or flushed right text
  74.   $85    (Used in other WordPerfect Corporation Products)
  75.   $86    Center page from top to bottom
  76.   $87    (Used in other WordPerfect Corporation Products)
  77.   $88    (Used in other WordPerfect Corporation Products)
  78.   $89    Tab after the right margin
  79.   $8A    Widow/orphan on
  80.   $8B    Widow/orphan off
  81.   $8C    Hard end of line and soft end of page
  82.   $8D    Footnote number (appears only inside of footnotes)
  83.   $8E    Reserved
  84.   $8F    Reserved
  85.   $90    (Used in other WordPerfect Corporation Products)
  86.   $91    (Used in other WordPerfect Corporation Products)
  87.   $92    (Used in other WordPerfect Corporation Products)
  88.   $93    (Used in other WordPerfect Corporation Products)
  89.   $94    Underline on
  90.   $95    Underline off
  91.   $96    Reverse video on
  92.   $97    Reverse video off
  93.   $98    (Used in other WordPerfect Corporation Products)
  94.   $99    Overstrike
  95.   $9A    Cancel hyphenation of following word
  96.   $9B    (Used in other WordPerfect Corporation Products)
  97.   $9C    Bold off
  98.   $9D    Bold on
  99.   $9E    Hyphenation off
  100.   $9F    Hyphenation on
  101.   $A0    Hard space
  102.   $A1    (Used in other WordPerfect Corporation Products)
  103.   $A2    (Used in other WordPerfect Corporation Products)
  104.   $A3    (Used in other WordPerfect Corporation Products)
  105.   $A4    (Used in other WordPerfect Corporation Products)
  106.   $A5    (Used in other WordPerfect Corporation Products)
  107.   $A6    (Used in other WordPerfect Corporation Products)
  108.   $A7    (Used in other WordPerfect Corporation Products)
  109.   $A8    (Used in other WordPerfect Corporation Products)
  110.   $A9    Hard hyphen in line
  111.   $AA    Hard hyphen at end of line
  112.   $AB    Hard hyphen at end of page
  113.   $AC    Soft hyphen
  114.   $AD    Soft hyphen at end of line
  115.   $AE    Soft hyphen at end of page
  116.   $AF    (Used in other WordPerfect Corporation Products)
  117.   $B0    (Used in other WordPerfect Corporation Products)
  118.   $B1    (Used in other WordPerfect Corporation Products)
  119.   $B2    (Used in other WordPerfect Corporation Products)
  120.   $B3    (Used in other WordPerfect Corporation Products)
  121.   $B4    (Used in other WordPerfect Corporation Products)
  122.   $B5    (Used in other WordPerfect Corporation Products)
  123.   $B6    (Used in other WordPerfect Corporation Products)
  124.   $B7    (Used in other WordPerfect Corporation Products)
  125.   $B8    (Used in other WordPerfect Corporation Products)
  126.   $B9    (Used in other WordPerfect Corporation Products)
  127.   $BA    (Used in other WordPerfect Corporation Products)
  128.   $BB    (Used in other WordPerfect Corporation Products)
  129.   $BC    Superscript
  130.   $BD    Subscript
  131.   $BE    Advance 1/2 line up
  132.   $BF    Advance 1/2 line down
  133.  
  134.  
  135. Multi-Byte Functions
  136.  
  137. Multi-byte function codes mark commands which require more than one byte.  
  138. They mark both the beginning and end of such functions in the file.  The 
  139. length is indicated for most functions, but some have a variable length.  In 
  140. these cases, programs should scan for the second occurrence of the function 
  141. code to indicate the end of the function.
  142.  
  143.      Length    Code    Command                    Format
  144.      6         $C0     Margin Reset               Byte:    $C0
  145.                                                   Byte:    Old left margin
  146.                                                   Byte:    Old right margin
  147.                                                   Byte:    New left margin
  148.                                                   Byte:    New right margin
  149.                                                   Byte:    $C0
  150.                                                   
  151.      4         $C1     Spacing reset              Byte:    $C1
  152.                                                   Byte:    Old spacing
  153.                                                   Byte:    New spacing
  154.                                                   Byte:    $C1
  155.      Note:  Spacing values are stored in half-line increments.
  156.  
  157.      3         $C2     Left margin release        Byte:    $C2
  158.                                                   Byte:    Number of spaces
  159.                                                            to go left
  160.                                                   Byte:    $C2
  161.      5         $C3     Center the following text  Byte:    $C3
  162.                                                   Byte:    Type of center:
  163.                                                            0 = between margins
  164.                                                            1 = around current
  165.                                                                column
  166.                                                   Byte:    Center column number
  167.                                                   Byte:    Starting column
  168.                                                            number
  169.                                                   Byte:    $C3
  170.                                                   Bytes:   Centered text
  171.                                                   Byte:    $83
  172.  
  173.      5         $C4     Align or flush right       Byte:    $C4
  174.                                                   Byte:    Align character
  175.                                                            (see below)
  176.                                                   Byte:    Align column number
  177.                                                   Byte:    Starting column
  178.                                                            number
  179.                                                   Byte:    $C4
  180.                                                   Bytes:   Aligned text
  181.                                                   Byte:    $84
  182.      Note:  If the alignment character is $0A (hard new line) then 
  183.      this is a flush right and the alignment column number is the 
  184.      right margin; otherwise, the alignment column number is the next 
  185.      tab stop.
  186.  
  187.      6         $C5     Reset hyphenation zone     Byte:    $C5
  188.                        (hotzone)                  Byte:    Old left hotzone
  189.                                                   Byte:    Old right hotzone
  190.                                                   Byte:    New left hotzone
  191.                                                   Byte:    New right hotzone
  192.                                                   Byte:    $C5
  193.  
  194.      4         $C6     Set page number position   Byte:    $C6
  195.                                                   Byte:    Old position code
  196.                                                   Byte:    New position code
  197.                                                            Codes:
  198.                                                            0 = None
  199.                                                            1 = Top Left
  200.                                                            2 = Top Center
  201.                                                            3 = Top Right
  202.                                                            4 = Top Left
  203.                                                                and Right
  204.                                                            5 = Bottom Left
  205.                                                            6 = Bottom Center
  206.                                                            7 = Bottom Right
  207.                                                            8 = Bottom Left
  208.                                                                and Right
  209.                                                   Byte:    $C6
  210.      6         $C7     Set page number            Byte:    $C7
  211.                                                   Byte:    Old number,high byte
  212.                                                   Byte:    Old number,low byte
  213.                                                   Byte:    New number,high byte
  214.                                                   Byte:    New number,low byte
  215.                                                   Byte:    $C7
  216.      Note:  The page numbers are words with the bytes in the "wrong" order.
  217.  
  218.      8         $C8     Set page number column     Byte:    $C8
  219.                        positions                  Byte:    Old left position
  220.                                                   Byte:    Old center position
  221.                                                   Byte:    Old right position
  222.                                                   Byte:    New left position
  223.                                                   Byte:    New center position
  224.                                                   Byte:    New right position
  225.                                                   Byte:    $C8
  226.     42         $C9     Set tabs                   Byte:    $C9
  227.                                                   20 Bytes:Old tab table
  228.                                                   20 Bytes:New tab table
  229.                                                   Byte:    $C9
  230.      Note:  Each bit in the tab table represents one position, from 
  231.      bit 0 to bit 159.
  232.  
  233.      3         $CA     Conditional end of page    Byte:    $CA
  234.                                                   Byte:    Number of single-
  235.                                                            spaced lines not
  236.                                                            to be broken
  237.                                                   Byte:    $CA
  238.  
  239.      6         $CB     Set pitch and/or font      Byte:    $CB
  240.                                                   Byte:    Old pitch
  241.                                                   Byte:    Old font
  242.                                                   Byte:    New pitch
  243.                                                   Byte:    New font
  244.                                                   Byte:    $CB
  245.      Note:  If the pitch is negative, then it is proportional.
  246.  
  247.      4         $CC     Set temporary margin       Byte:    $CC
  248.                        (indent)                   Byte:    Old temporary margin
  249.                                                   Byte:    New temporary margin
  250.                                                   Byte:    $CC
  251.  
  252.      3         $CD     End of temporary margin    Byte:    $CD
  253.                                                   Byte:    Temporary margin
  254.                                                   Byte:    $CD
  255.  
  256.      4         $CE     Set top margin    Byte:    $CE
  257.                                                   Byte:    Old top margin
  258.                                                   Byte:    New top margin
  259.                                                   Byte:    $CE
  260.  
  261.      3         $CF     Suppress page              Byte:    $CF
  262.                        characteristics            Byte:    Suppress code:
  263.                                                            (Any combination
  264.                                                            valid)
  265.                                                            Bit: Meaning:
  266.                                                            0    all suppressed
  267.                                                            1    Page numbers 
  268.                                                                 suppressed.
  269.                                                            2    Page number 
  270.                                                                 moved to 
  271.                                                                 bottom.
  272.                                                            3    All headers 
  273.                                                                 suppressed
  274.                                                            4    Header A 
  275.                                                                 suppressed
  276.                                                            5    Header B 
  277.                                                                 suppressed
  278.                                                            6    Footer A 
  279.                                                                 suppressed
  280.                                                            7    Footer B 
  281.                                                                 suppressed
  282.                                                   Byte:    $CF
  283.  
  284.      6         $D0     Set form length            Byte:    $D0
  285.                                                   Byte:    Old form length
  286.                                                   Byte:    Old number of
  287.                                                            text lines
  288.                                                   Byte:    New form length
  289.                                                   Byte:    New number of
  290.                                                            text lines
  291.                                                   Byte:    $D0
  292.  
  293.    Variable    $D1     Header/footer              Byte:    $D1
  294.                                                   Byte:    Old def byte
  295.                                                            (see below)
  296.                                                   Byte:    Number of half-lines
  297.                                                            used by old 
  298.                                                            header/footer
  299.                                                   2 bytes: $FF
  300.                                                   Byte:    Left margin
  301.                                                   Byte:    Right margin
  302.                                                   Bytes:   ASCII Text
  303.                                                   Byte:    $FF
  304.                                                   Byte:    Number of half-lines
  305.                                                            used by new 
  306.                                                            header/footer
  307.                                                   Byte:    New def byte
  308.                                                            (see below)
  309.                                                   Byte:    $D1
  310. The format of the def byte is as follows:
  311. Bits 0-1:    Type:    0 = Header A    Bits 2-7:    Occurrence: 0 = Never
  312.                       1 = Header B                             1 = All pages
  313.                       2 = Footer A                             2 = Odd pages
  314.                       3 = Footer B                             4 = Even pages
  315.  
  316. Note:  The low-order two bits of the old def byte (the old types) must be correct.
  317.  
  318.    Variable    $D2     Footnote                   Byte:    $D2
  319.                                                   Byte:    Footnote number
  320.                                                   Byte:    Number of half-lines
  321.                                                   Byte:    $FF
  322.                                                   Byte:    Left margin
  323.                                                   Byte:    Right margin
  324.                                                   Bytes:   ASCII Text
  325.                                                   Byte:    $D2
  326.      Note:  WordPerfect versions 1.0 and 1.1 use this function code.  
  327.      Versions 2.0 and later use function code $E2 instead.
  328.  
  329.      4         $D3     Set Footnote Number        Byte:    $D3
  330.                                                   Byte:    Old footnote number
  331.                                                   Byte:    New footnote number
  332.                                                   Byte:    $D3
  333.      Note:  WordPerfect versions 1.0 and 1.1 use this function code.  
  334.      Versions 2.0 and later use function code $E4 instead.
  335.  
  336.      4         $D4     (Used in other WordPerfect Corporation Products)
  337.  
  338.      4         $D5     Set lines per inch         Byte:    $D5
  339.                                                   Byte:    Old LPI code
  340.                                                   Byte:    New LPI code
  341.                                                   Byte:    $D5
  342.      Note:  Only 6 or 8 lines per inch is valid.
  343.  
  344.      6         $D6     Set extended tabs          Byte:    $D6
  345.                                                   Byte:    Old starting
  346.                                                            position
  347.                                                   Byte:    Old increment
  348.                                                   Byte:    New starting
  349.                                                            position
  350.                                                   Byte:    New increment
  351.                                                   Byte:    $D6
  352.      Note:  The starting column position must be at least 160.
  353.  
  354.    Variable    $D7     (Used in other WordPerfect Corporation Products)
  355.  
  356.      4         $D8     Set alignment character    Byte:    $D8
  357.                                                   Byte:    Old alignment
  358.                                                            character
  359.                                                   Byte:    New alignment
  360.                                                            character
  361.                                                   Byte:    $D8
  362.      4         $D9     Set left margin release    Byte:    $D9
  363.                        (number of columns         Byte:    Old number
  364.                        to go left)                Byte:    New number
  365.                                                   Byte:    $D9
  366.  
  367.      4         $DA     Set underline mode         Byte:    $DA
  368.                                                   Byte:    Old mode (see below)
  369.                                                   Byte:    New mode (see below)
  370.                                                   Byte:    $DA
  371.      The underline mode is defined as follows:
  372.      0 = Normal Underline
  373.      1 = Double Underline
  374.      2 = Single Underline Continuous
  375.      3 = Double Underline Continuous
  376.  
  377.      4         $DB     Set sheet feeder bin       Byte:    $DB
  378.                        number                     Byte:    Old number
  379.                                                   Byte:    New number
  380.                                                   Byte:    $DB
  381.      Note:  The number is zero based (bin #1 is stored as 0).
  382.  
  383.    Variable    $DC     End of page function       Byte:    $DC
  384.                       (WordPerfect inserts this   Byte:    Number of 1/2 lines  
  385.                       and it changes with                  at end of page,
  386.                       each version)                        low 7 bits 
  387.                                                   Byte:    Number of 1/2 lines 
  388.                                                            at end of page,
  389.                                                            high 7 bits
  390.                                                   Byte:    Number of 1/2 lines 
  391.                                                            used for footnotes
  392.                                                   Byte*:   Number of pages
  393.                                                            used for footnotes
  394.                                                   Byte*:   Number of footnotes
  395.                                                            on this page
  396.                                                   Byte:    CEOP Flag
  397.                                                   Byte:    Suppress code
  398.                                                   Byte:    $DC
  399.      Note:  Bytes marked with an asterisk (*) are fields present 
  400.      only in WordPerfect 2.0 and later.
  401.  
  402.     24         $DD     (Used in other WordPerfect Corporation Products)
  403.  
  404.      4         $DE     End of temporary margin    Byte:    $DE
  405.                                                   Byte:    Old left
  406.                                                            temporary margin
  407.                                                   Byte:    Old right
  408.                                                            temporary margin
  409.                                                   Byte:    $DE
  410.                                                   
  411.    Variable    $DF     Invisible characters       Byte:    $DF
  412.                        (embedded printer command) Bytes:   7-bit text
  413.                                                   Byte:    $DF
  414.  
  415.      4         $E0     Temporary margin           Byte:    $E0
  416.                                                   Byte:    New right
  417.                                                            temporary margin
  418.                                                   Byte:    New left
  419.                                                            temporary  margin
  420.                                                   Byte:    $E0
  421.  
  422.      3         $E1     (Used in other WordPerfect Corporation Products)
  423.  
  424.    Variable    $E2     New footnote/endnote       Byte:    $E2
  425.                        (WordPerfect 2.0 and later)Byte:    Def byte (see below)
  426.                                                   Byte:    Value A (see below)
  427.                                                   Byte:    Value B (see below)
  428.                                                   Byte:    Value C (see below)
  429.                                                   Byte:    Value D (see below)
  430.                                                   Byte:    Old footnote length
  431.                                                            in 1/2 lines
  432.                                                   Byte:    Number of lines
  433.                                                            on page 1
  434.                                                   Byte:    Number of lines
  435.                                                            on page 2
  436.                                                   Byte:    Number of lines
  437.                                                            on page 3
  438.                                                       .
  439.                                                       .
  440.                                                       .
  441.                                                   Byte:    Number of lines
  442.                                                            on page N
  443.                                                   Byte:    Number of pages
  444.                                                   Byte:    $FF
  445.                                                   Byte:    Left margin
  446.                                                   Byte:    Right margin
  447.                                                   Bytes:   ASCII Text
  448.                                                   Byte:    $E2
  449.      The Def Byte is defined as follows:
  450.      Def Bit 0:    0 = use numbers
  451.                    1 = use characters
  452.      Def Bit 1:    0 = footnote
  453.                    1 = endnote
  454.  
  455.      If Def Bit 0 = 0, then Values A and B are the footnote or 
  456.      endnote number taken together (see below.)  If Def Bit 0 = 1, 
  457.      then Value A is the number of characters and Value B is the 
  458.      character.
  459.  
  460.      Note:  Values A and B (when taken together) and Values C and D 
  461.      (always) are 14-bit numbers split into 7-bit bytes, high order 
  462.      byte first.
  463.  
  464.      Note:  For endnotes, there is just a null between Value D and 
  465.      the $FF byte.
  466.  
  467.    150         $E3     Footnote information/      Byte:    $E3
  468.                        options
  469.                                                   74 Bytes:Old Footnote values
  470.                                                   74 Bytes:New Footnote values
  471.                                                   Byte:    $E3
  472.  
  473.      The footnote values are defined as follows:  Byte:    Spacing 
  474.                                                            in footnotes (in 
  475.                                                            half-lines)
  476.                                                   Byte:    Spacing between
  477.                                                            footnotes (in
  478.                                                            half-lines)
  479.                                                   Byte:    Number of lines
  480.                                                            to keep together
  481.                                                   Byte:    Flag byte:
  482.                                                    Bit 0:    1 if numbering
  483.                                                              starts
  484.                                                              on each page
  485.                                                    Bits 1-2: (for footnotes)
  486.                                                              0 = Use numbers 
  487.                                                              1 = Use characters
  488.                                                              2 = Use letters
  489.                                                    Bits 3-4: (for endnotes)
  490.                                                              0 = Use numbers
  491.                                                              1 = Use characters
  492.                                                              2 = Use letters
  493.                                                    Bits 5-6: 0 = No line
  494.                                                                  separator
  495.                                                              1 = 2" line
  496.                                                              2 = Line from left
  497.                                                                  to right
  498.                                                                  margin
  499.                                                              3 = 2" line and
  500.                                                                  continued
  501.                                                                  message
  502.                                                    Bit 7:    0 = footnotes
  503.                                                                  after text
  504.                                                              1 = footnotes at
  505.                                                                  bottom of page
  506.                                                   Byte:    Number of characters
  507.                                                            used in place of 
  508.                                                            footnote numbers
  509.                                                   5 Bytes: Characters used in
  510.                                                            place of footnote 
  511.                                                            numbers (null 
  512.                                                            terminated if less 
  513.                                                            than five)
  514.                                                   Byte:    Number of
  515.                                                            displayable
  516.                                                            characters in string 
  517.                                                            for footnote text
  518.                                                   15 Bytes:String for
  519.                                                            footnote text
  520.                                                   Byte:    Number of
  521.                                                            displayable
  522.                                                            characters in string 
  523.                                                            for endnote text
  524.                                                   15 Bytes:String for
  525.                                                            endnote text
  526.                                                   Byte:    Number of
  527.                                                            displayable
  528.                                                            characters in string 
  529.                                                            for footnote note
  530.                                                   15 Bytes:String for
  531.                                                            footnote note
  532.                                                   Byte:    Number of
  533.                                                            displayable
  534.                                                            characters in string 
  535.                                                            for endnote note
  536.                                                   15 Bytes:String for
  537.                                                            endnote note
  538.  
  539.      6         $E4     New set footnote           Byte:    $E4
  540.                        (WordPerfect 2.0 and later)Byte:    Old number,high byte
  541.                                                   Byte:    Old number,low byte
  542.                                                   Byte:    New number,high byte
  543.                                                   Byte:    New number,low byte
  544.                                                   Byte:    $E4
  545.  
  546.     Note:  The new number is zero based (stored as new number minus one)
  547.     Note:  Footnote numbers are 14-bit numbers split into 7-bit 
  548.     bytes, high order byte first.
  549.  
  550.     23         $E5    (Used in other WordPerfect Corporation Products)
  551.     11         $E6    (Used in other WordPerfect Corporation Products)
  552.      3         $E7    (Used in other WordPerfect Corporation Products)
  553.      3         $E8    (Used in other WordPerfect Corporation Products)
  554.    Variable    $E9    (Used in other WordPerfect Corporation Products)
  555.    Variable    $EA    (Used in other WordPerfect Corporation Products)
  556.     32         $EB    (Used in other WordPerfect Corporation Products)
  557.      4         $EC    (Used in other WordPerfect Corporation Products)
  558.    Variable    $ED    (Used in other WordPerfect Corporation Products)
  559.     44         $EE    (Used in other WordPerfect Corporation Products)
  560.     18         $EF    (Used in other WordPerfect Corporation Products)
  561.      6         $F0    (Used in other WordPerfect Corporation Products)
  562.    106         $F1    (Used in other WordPerfect Corporation Products)
  563.    Variable    $F2    (Used in other WordPerfect Corporation Products)
  564.    100         $F3    (Used in other WordPerfect Corporation Products)